#include "glib.h"
#include "hlfs.h"


int main(){
   g_print(" test init hlfs >>> \n");
   const char * uri = "hdfs:///tmp/testenv";
   const char * fs_name = "testfs";
   struct hlfs_ctrl * ctrl = init_hlfs(uri,fs_name);
   g_assert(ctrl != NULL);
   g_print(" test  hlfs open >>> \n");
   int ret = 0;
   ret = hlfs_open(ctrl,1);
   g_assert(ret == 0);
   g_print(" test  hlfs write >>> \n");
   char content[8192*10];
   int offset = 0;
   while(offset < 1024*1024*100){
      ret = hlfs_write(ctrl,content,8192*10,offset);
      g_assert(ret==8192*10);
      offset +=8192*10;
      printf("offset:%ld\n",offset);
   } 
   return 0;
}
